home *** CD-ROM | disk | FTP | other *** search
- ; $VER: Install_GS510 1.01 (19.06.98)
- ; Script to install GhostScript V5.10
- ; Written from Manfred Tremmel
- ; ©1998 by MT Graphic & Design, Manfred Tremmel
-
- (complete 0)
-
- (set @default-dest "sys:")
-
- ;=============================================================================
- ; Deutsche strings
- (if (= @language "deutsch")
- (
- (set #bad-kick "Sie benötigen AMIGA OS 2.0+ zum Installieren von GhostScript!")
-
- (set #ask-dir "Wohin soll GhostScript installiert werden?\nAchtung es wird kein Verzeichnis erstellt!")
-
- (set #ask-cpu "Welchen Prozessor haben Sie installiert?\nDas entsprechende Archiv muß vorhanden sein.")
-
- (set #exists " nicht vorhanden")
-
- (set #startuptext (cat "\n\n\nUm mit GhostScript richtig arbeiten zu können "
- "muß eine Änderung in der User-Startup vorgenommen werden.\n\n"))
-
- (set #ask-ps (cat "Bitte wählen Sie Ihren installierten Drucker, "
- "wenn dieser nicht vorhanden ist, wählen Sie ein Vorgängermodell, "
- "oder den Workbench-Druckertreiber"))
- (set #ask0-ps "GhostScript mit Wokbench-Druckertreiber")
- (set #ask1-ps "GhostScript-Direkt Epson")
- (set #ask2-ps "GhostScript-Direkt HP")
- (set #ask3-ps "GhostScript-Direkt Canon")
-
- (set #ask0-ps-epson "Epson 9 Nadel (oder kompatibel)")
- (set #ask1-ps-epson "Epson 24 Nadel (oder kompatibel)")
- (set #ask2-ps-epson "Epson Stylus (Color)")
-
- (set #ask0-ps-hp "HP DeskJet 500C/540C")
- (set #ask1-ps-hp "HP DeskJet 550C/560C")
- (set #ask2-ps-hp "HP PaintJet XL300/DeskJet 1200C")
- (set #ask3-ps-hp "HP PaintJet")
- (set #ask4-ps-hp "HP PaintJet XL")
- (set #ask5-ps-hp "HP LaserJet")
- (set #ask6-ps-hp "HP LaserJet Plus")
- (set #ask7-ps-hp "HP LaserJet 2p")
- (set #ask8-ps-hp "HP LaserJet 3")
- (set #ask9-ps-hp "HP LaserJet 4")
-
- (set #ask0-ps-canon "Canon BJ10e")
- (set #ask1-ps-canon "Canon BJ200")
- (set #ask2-ps-canon "Canon BJC-600/4000/70/Stylewriter2x00")
- (set #ask3-ps-canon "Canon BJC-800")
-
- (set #ask-papersize "Wählen Sie die maximale Papiergröße Ihres Druckers:")
- (set papersize-default 6)
-
- (set #ask-printerport "Geben Sie die Schnittstelle, an der Ihr Drucker angeschlossen ist:")
- ))
- ;=============================================================================
- ; English strings
- (if (= @language "english")
- (
- (set #bad-kick "To install GhostScript AMIGA OS 2.0+ is required!")
-
- (set #ask-dir "Where do you want to install GhostScript?\nAttention, no drawer will be created!")
-
- (set #ask-cpu "Which Processor have you installed?\nThe corresponding archive must be present.")
-
- (set #exists " dosen't exist")
-
- (set #startuptext "\n\n\nTo work correctly with GhostScript User-Startup must be changed\n\n")
-
- (set #ask-ps (cat "Please choose your installed printer, "
- "if it isn't in the list, select the predecessor printer "
- "or the Workbench-Printerdriver"))
- (set #ask0-ps "GhostScript with Workbench-Printerdriver")
- (set #ask1-ps "GhostScript-Direct Epson")
- (set #ask2-ps "GhostScript-Direct HP")
- (set #ask3-ps "GhostScript-Direct Canon")
-
- (set #ask0-ps-epson "Epson 9 Nadel (or compatible)")
- (set #ask1-ps-epson "Epson 24 Nadel (or compatible)")
- (set #ask2-ps-epson "Epson Stylus (Color)")
-
- (set #ask0-ps-hp "HP DeskJet 500C/540C")
- (set #ask1-ps-hp "HP DeskJet 550C/560C")
- (set #ask2-ps-hp "HP PaintJet XL300/DeskJet 1200C")
- (set #ask3-ps-hp "HP PaintJet")
- (set #ask4-ps-hp "HP PaintJet XL")
- (set #ask5-ps-hp "HP LaserJet")
- (set #ask6-ps-hp "HP LaserJet Plus")
- (set #ask7-ps-hp "HP LaserJet 2p")
- (set #ask8-ps-hp "HP LaserJet 3")
- (set #ask9-ps-hp "HP LaserJet 4")
-
- (set #ask0-ps-canon "Canon BJ10e")
- (set #ask1-ps-canon "Canon BJ200")
- (set #ask2-ps-canon "Canon BJC-600/4000/70/Stylewriter2x00")
- (set #ask3-ps-canon "Canon BJC-800")
-
- (set #ask-papersize "Choose maximum papersize, your printer can handle:")
- (set papersize-default 0)
-
- (set #ask-printerport "Which port your printer is joined:")
- ))
-
- ;=============================================================================
- ; Sicherstellen, daß mindestens OS2.0 (V37) installiert ist
-
- (if (< (/ (getversion) 65536) 37)
- (abort #bad-kick)
- )
-
-
- ;=============================================================================
- ; Verzeichnis auswählen:
-
- (set target_dir
- (askdir (prompt #ask-dir @askdir)
- (help @askdir-help)
- (default @default-dest)
- (disk)
- )
- )
- (set @default-dest target_dir)
-
- ;=============================================================================
- ; Prüfen des Porzessors, um die entsprechende Version auszuwaehlen.
-
- (set CPUSet 0)
- (set CPUStr (database "cpu"))
- (set FPUStr (database "fpu"))
- (if (>= CPUStr "68020")
- (if (>= CPUStr "68040")
- (set CPUSet 3)
- ((if (= FPUStr "NOFPU")
- (set CPUSet 1)
- (set CPUSet 2)
- ))
- )
- )
-
- (set CPUSet
- (askchoice (prompt #ask-cpu)
- (help "")
- (choices "68000/68010"
- "68020/68030"
- "68020/68030 + FPU"
- "68040/68060"
- )
- (default CPUSet)
- )
- )
-
- (set CPUArchiv
- (select CPUSet "GS510_000.lha"
- "GS510_020.lha"
- "GS510_020fpu.lha"
- "GS510_040fpu.lha"
- ""
- )
- )
- (set CPUProgramm
- (select CPUSet "gs_000"
- "gs_020"
- "gs_020fpu"
- "gs_040fpu"
- ""
- )
- )
-
- ;=============================================================================
- ; Abfrage, welcher Drucker installiert ist.
-
- (set pstype
- (askchoice (prompt #ask-ps)
- (help "")
- (choices #ask0-ps
- #ask1-ps
- #ask2-ps
- #ask3-ps
- )
- (default 0)
- )
- )
-
- (set PSPrSc "GSZusatz/GhostPrint_PrefPrinter")
-
- (if (= pstype 1)
- (
- (set pstypedr
- (askchoice (prompt #ask-ps)
- (help #ask-ps-help)
- (choices #ask0-ps
- #ask0-ps-epson
- #ask1-ps-epson
- #ask2-ps-epson
- )
- (default 0)
- )
- )
- (set PsPrSc
- (select pstypedr "GSZusatz/GhostPrint_PrefPrinter"
- "GSZusatz/GhostPrint_EPS9N"
- "GSZusatz/GhostPrint_EPS24N"
- "GSZusatz/GhostPrint_SC"
- ""
- )
- )
- )
- )
-
- (if (= pstype 2)
- (
- (set pstypedr
- (askchoice (prompt #ask-ps)
- (help #ask-ps-help)
- (choices #ask0-ps
- #ask0-ps-hp
- #ask1-ps-hp
- #ask2-ps-hp
- #ask3-ps-hp
- #ask4-ps-hp
- #ask5-ps-hp
- #ask6-ps-hp
- #ask7-ps-hp
- #ask8-ps-hp
- #ask9-ps-hp
- )
- (default 0)
- )
- )
- (set PsPrSc
- (select pstypedr "GSZusatz/GhostPrint_PrefPrinter"
- "GSZusatz/GhostPrint_CDJ500"
- "GSZusatz/GhostPrint_CDJ550"
- "GSZusatz/GhostPrint_PJXL300"
- "GSZusatz/GhostPrint_PJTEST"
- "GSZusatz/GhostPrint_PJXLTEST"
- "GSZusatz/GhostPrint_LASERJET"
- "GSZusatz/GhostPrint_LJETPLUS"
- "GSZusatz/GhostPrint_LJET2P"
- "GSZusatz/GhostPrint_LJET3"
- "GSZusatz/GhostPrint_LJET4"
- ""
- )
- )
- )
- )
- (if (= pstype 3)
- (
- (set pstypedr
- (askchoice (prompt #ask-ps)
- (help #ask-ps-help)
- (choices #ask0-ps
- #ask0-ps-canon
- #ask1-ps-canon
- #ask2-ps-canon
- #ask3-ps-canon
- )
- (default 0)
- )
- )
- (set PsPrSc
- (select pstypedr "GSZusatz/GhostPrint_PrefPrinter"
- "GSZusatz/GhostPrint_BJ10E"
- "GSZusatz/GhostPrint_BJ200"
- "GSZusatz/GhostPrint_BJC600"
- "GSZusatz/GhostPrint_BJC800"
- ""
- )
- )
- )
- )
-
- ;=============================================================================
- ; Überprüfen, ob die Archive vorhanden sind
-
- (if (<> (exists "GS510-data.lha" (noreq)) 1)
- (abort (cat "GS510-data.lha" #exists))
- )
-
- (if (<> (exists "GS510-fonts-st.lha" (noreq)) 1)
- (abort (cat "GS510-fonts-st.lha" #exists))
- )
-
- (if (<> (exists "GS510FontMap.lha" (noreq)) 1)
- (abort (cat "GS510FontMap.lha" #exists))
- )
-
- (if (<> (exists CPUArchiv (noreq)) 1)
- (abort (cat CPUArchiv #exists))
- )
-
- ;=============================================================================
- ; ENV-Variablen auslesen, abfragen und setzen
-
- (set printerport "par:")
-
- (if (= (exists "env:gsport") 1)
- (set printport (getenv "env:gsport"))
- )
- (if (= (exists "env:gspapersize") 1)
- (
- (set papersize (getenv "env:gspapersize"))
- (set m 0)
- (while (< m 25)
- (if (= papersize
- (select m "letter"
- "legal"
- "a0"
- "a1"
- "a2"
- "a3"
- "a4"
- "a5"
- "a6"
- "a7"
- "a8"
- "a10"
- "b0"
- "b1"
- "b2"
- "b3"
- "b4"
- "b5"
- "archA"
- "archB"
- "archC"
- "flsa"
- "flse"
- "halfletter"
- "11x17"
- "ledger"
- ""
- )
- )
- (
- (set papersize-default m)
- (set m 25)
- )
- )
- (set m (+ m 1))
- )
- )
- )
-
- (set papersize-default
- (askchoice (prompt #ask-papersize)
- (help "")
- (choices "letter"
- "legal"
- "a0"
- "a1"
- "a2"
- "a3"
- "a4"
- "a5"
- "a6"
- "a7"
- "a8"
- "a10"
- "b0"
- "b1"
- "b2"
- "b3"
- "b4"
- "b5"
- "archA"
- "archB"
- "archC"
- "flsa"
- "flse"
- "halfletter"
- "11x17"
- "ledger"
- )
- (default papersize-default)
- )
- )
-
- (set papersize
- (select papersize-default
- "letter"
- "legal"
- "a0"
- "a1"
- "a2"
- "a3"
- "a4"
- "a5"
- "a6"
- "a7"
- "a8"
- "a10"
- "b0"
- "b1"
- "b2"
- "b3"
- "b4"
- "b5"
- "archA"
- "archB"
- "archC"
- "flsa"
- "flse"
- "halfletter"
- "11x17"
- "ledger"
- ""
- )
- )
- (run (cat "setenv gspapersize " papersize))
- (copyfiles (source "ENV:gspapersize")
- (dest "ENVARC:")
- )
-
- (set printerport
- (askstring
- (prompt #ask-printerport)
- (help @askstring-help)
- (default printerport)
- )
- )
- (run (cat "setenv gsport " printerport))
- (copyfiles (source "ENV:gsport")
- (dest "ENVARC:")
- )
-
- ;=============================================================================
- ; Entpacken des Hauptprogramms und kopieren ins Zielverzeichnis
-
- (run (CAT "lha x -r " CPUArchiv " t:"))
- (complete 10)
-
- (copylib (prompt "GhostScript" @copylib)
- (help @copylib-help)
- (source (cat "t:ghostscript/5.10/" CPUProgramm))
- (dest target_dir)
- (newname "gs")
- (confirm 2)
- )
- (complete 20)
-
- (run "delete <>NIL: t:ghostscript all")
- (complete 25)
-
- ;=============================================================================
- ; Entpacken des data-Archives und kopieren ins Zielverzeichnis
-
- (run "lha x -r GS510-data.lha t:")
- (complete 35)
-
- (if (<> (exists (TACKON target_dir ("data")) (noreq)) 2)
- (makedir ((TACKON target_dir ("data")))
- (infos)
- )
- )
-
- (copyfiles (prompt "data" @copyfiles)
- (help @copyfiles-help)
- (source "t:ghostscript/5.10/data")
- (dest (TACKON target_dir "data"))
- (all)
- )
-
- (copyfiles (prompt "data" @copyfiles)
- (help @copyfiles-help)
- (source "t:ghostscript/5.10")
- (dest (TACKON target_dir "data"))
- (pattern "#?.ps")
- )
-
- (complete 45)
-
- (run "delete <>NIL: t:ghostscript all")
- (complete 50)
-
- ;=============================================================================
- ; Entpacken des fonts-st-Archives und kopieren ins Zielverzeichnis
-
- (run "lha x -r GS510-fonts-st.lha t:")
- (complete 60)
-
- (if (<> (exists (TACKON target_dir ("fonts")) (noreq)) 2)
- (makedir ((TACKON target_dir ("fonts")))
- (infos)
- )
- )
-
- (copyfiles (prompt "fonts" @copyfiles)
- (help @copyfiles-help)
- (source "t:fonts")
- (dest (TACKON target_dir "fonts"))
- (all)
- )
-
- (complete 70)
-
- (run "delete <>NIL: t:fonts all")
- (complete 73)
-
- (run "lha x -r GS510FontMap.lha t:")
- (complete 74)
-
- (copyfiles (prompt "fontmap" @copyfiles)
- (help @copyfiles-help)
- (source "t:ghostscript/gs5.10/Fontmap")
- (dest (TACKON target_dir "data"))
- (all)
- )
- (run "delete <>NIL: t:ghostscript all")
- (complete 75)
-
- ;=============================================================================
- ; Entpacken des fonts-ot-Archives und kopieren ins Zielverzeichnis
-
- (if (= (exists "GS510-fonts-ot.lha" (noreq)) 1)
- (
- (run "lha x -r GS510-fonts-ot.lha t:")
- (complete 80)
-
- (copyfiles (prompt "fonts" @copyfiles)
- (help @copyfiles-help)
- (source "t:fonts")
- (dest (TACKON target_dir "fonts"))
- (all)
- )
- )
- )
-
- (complete 80)
-
- (run "delete <>NIL: t:fonts all")
- (complete 85)
-
- ;=============================================================================
- ; Anzeige und Druckscripts kopieren
-
- (copyfiles (prompt "GhostView" @copyfiles)
- (help @copyfiles-help)
- (source "GSZusatz/GhostView")
- (dest target_dir)
- (infos)
- )
-
- (copyfiles (prompt "GhostViewScreen" @copyfiles)
- (help @copyfiles-help)
- (source "GSZusatz/GhostViewScreen")
- (dest target_dir)
- (infos)
- )
-
- (copyfiles (prompt "GhostPrint" @copyfiles)
- (help @copyfiles-help)
- (source PSPrSc)
- (dest target_dir)
- (infos)
- )
-
- (complete 90)
-
- ;=============================================================================
- ; Eintrag in die User-Startup
-
- (set command1 (cat "assign GhostScript: \"" target_dir "\""))
- (set command2 "assign PSFonts: GhostScript:fonts")
- (set command3 "path GhostScript: add")
-
- (run command1)
- (run command2)
- (run command3)
-
- (set commandtext (cat command1 "\n" command2 "\n" command3))
-
- (startup "GhostScript"
- (prompt (cat #startuptext commandtext))
- (help "")
- (command commandtext)
- )
-
- (complete 100)
-
- ;=============================================================================
- ; Fertig
-